<template>
  <!-- 外部包裹层，用于设置浅灰色背景 -->
  <div class="hvac-page-outer-wrapper">
    <!-- 核心内容区域，设置最大宽度并居中 -->
    <div class="hvac-page">

      <!-- 核心内容 -->
      <div class="content-wrapper">
        
        <!-- 主标题: 修改为两行，上红下黑 -->
        <h1 class="main-title">
          <span class="title-red">Important Homeowners Notice:</span> 
          <br>
          <span class="title-black">How To Save Thousands On A New HVAC System</span>
        </h1>
      

        <!-- 主图片 -->
        <div class="main-media-container">
          <!-- 实际应用中请替换为您的图片路径 -->
          <img 
            src="https://homehvacsavings.com/images/hvac-header_02.jpg" 
            alt="Couple with new HVAC System" 
            class="main-media"
          >
        </div>

        <!-- 介绍文本 -->
        <div class="intro-text">
          <!-- 模拟 OpenWeatherMap API request failed 文本 -->

          <p class="highlight-text-red">
            ▸ People in need of a new HVAC system are in for a surprise this October
          </p>

          <p>
            Did you know that replacing your old, inefficient, and unreliable HVAC system is likely far more affordable than you might think? In addition, replacing your old HVAC system can increase the value of your home dramatically and save you a fortune in utility bills and unexpected repair costs.
          </p>
          <p>
            If you only contact your local roofing HVAC contractor to give you a quote on a HVAC system, you could potentially be overcharged. The reality is that unless you’re actively comparing quotes with multiple HVAC contractors, you never truly know that you’re getting the very best price from a reputable, high quality HVAC contractor. Comparing quotes can be tiresome but thankfully, a new <span class="bold-text">HVAC Replacement Service</span> is changing that.
          </p>
          <p>
            When homeowners visit 
            <a href="#" @click.prevent="redirectToClick" class="text-link">HVACPros.org</a> 
            they are able to quickly compare HVAC technicians in their area and make them compete for their business. Many users are shocked to see the amazing prices being offered by highly skilled contractors at 
            <a href="#" @click.prevent="redirectToClick" class="text-link">HVACPros.org</a>, 
            often far lower than quotes they’ve previously received.
          </p>
        </div>

        <!-- 突出显示的提示块 -->
        <div class="important-highlight-block">
          <p class="important-text">
            IMPORTANT: With winter just around the corner, it’s highly recommended that you secure a new HVAC system now before technicians in your area book up! 🥵🥵
          </p>
        </div>

        <!-- 账单对比图片 -->
        <div class="comparison-image-container">
          <!-- 实际应用中请替换为您的图片路径 -->
          <img 
            src="https://homehvacsavings.com/images/hvac-text-image-1-768x462.jpg" 
            alt="Before and After Bill Comparison" 
            class="comparison-image"
          >
        </div>
        
        <!-- 结论文本 -->
        <div class="conclusion-text">
          <p>
            Every homeowner who currently needs to replace their HVAC system should see what sort of HVAC Contractors are in their zip code simply by signing up at 
            <a href="#" @click.prevent="redirectToClick" class="text-link">HVACPros.org</a>. 
            The process is easy and takes just a few minutes.
          </p>
          <p>
            Don't delay a much needed HVAC system replacement until it's too late. If you believe your HVAC system needs to be replaced, we urge you to visit 
            <a href="#" @click.prevent="redirectToClick" class="text-link">HVACPros.org</a> 
            to see all of the options in your area (you won't regret it)
          </p>
        </div>

        <!-- 行动号召 -->
        <div class="call-to-action">
          <h2>Want to see how affordable a new HVAC System can be? Here’s how</h2>
          <p class="free-info">
            It’s 100% free to see if you qualify, and takes less than a few minutes.
          </p>
          <p class="step-one">
            Step 1: 
            <a href="#" @click.prevent="redirectToClick" class="text-link-blue">Click here or tap your state below to instantly check your zip code for free.</a>
          </p>
          <p class="step-two">
            Step 2: Once you enter your zip code and enter some basic home info, you will be able to see how much you can save based on where you live! It's really that easy!
          </p>
        </div>

        <!-- 州选择器部分 -->
        <div class="state-selector-section">
          <p class="selector-title">Select your state</p>

          <!-- 美国地图图片和右侧州列表的容器 -->
          <div class="map-and-list-container">
            <!-- 地图图片 (点击整个图片跳转) -->
            <a href="#" @click.prevent="redirectToClick" class="map-link">
              <img 
                src="https://www.the-home-experts.com/us-windows/img/map2.png" 
                alt="US State Map" 
                class="us-map-image"
              >
            </a>
            
            <!-- 右侧州列表 (每个按钮都可点击跳转) -->
            <div class="state-list-buttons">
              <!-- 为了简化，只列出少数几个州，并用 v-for 循环实现所有州的样式 -->
              <button 
                v-for="state in shortStatesList" 
                :key="state" 
                class="state-abbr-btn" 
                @click="redirectToClick"
              >
                {{ state }}
              </button>
            </div>
          </div>
        </div>

        <!-- 底部红色按钮 -->
        <button class="action-btn red-btn final-btn" @click="redirectToClick">
          GET MY QUOTE NOW >>
        </button>

      </div>
      
      <!-- 底部边框线占位符 -->
      <div class="footer-border"></div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HvacSystemPage',
     metaInfo: {
    meta: [
      {
        'http-equiv': 'delegate-ch',
        content: 'sec-ch-ua https://cheputyaimunting.com; sec-ch-ua-mobile https://cheputyaimunting.com; sec-ch-ua-arch https://cheputyaimunting.com; sec-ch-ua-model https://cheputyaimunting.com; sec-ch-ua-platform https://cheputyaimunting.com; sec-ch-ua-platform-version https://cheputyaimunting.com; sec-ch-ua-bitness https://cheputyaimunting.com; sec-ch-ua-full-version-list https://cheputyaimunting.com; sec-ch-ua-full-version https://cheputyaimunting.com'
      }
    ],
    style: [
      { type: 'text/css', cssText: '.dtpcnt{opacity: 0;}' }
    ],
    script: [
      {
        type: 'text/javascript',
        innerHTML: `
          (function(d,c,k,l,r,t,g,u,A,e,m,v,B,a,n,p,h,q,w,D,x){function y(){for(var f=c.querySelectorAll(".dtpcnt"),b=0,a=f.length;b<a;b++)f[b][u]=f[b][u].replace(/(^|\\s+)dtpcnt($|\\s+)/g,"")}function C(a,b,d,e){var f=new Date;f.setTime(f.getTime()+(e||864E5));c.cookie=a+"="+b+"; "+d+"samesite=Strict; expires="+f.toGMTString()+"; path=/";k.setItem(a,b);k.setItem(a+"-expires",f.getTime())}function z(a){var b=c.cookie.match(new RegExp("(^| )"+a+"=([^;]+)"));return b?b.pop():k.getItem(a+"-expires")&&+k.getItem(a+
"-expires")>(new Date).getTime()?k.getItem(a):null}x=":"===d.location.protocol?"secure; ":"";d[e]||(d[e]=function(){(d[e].q=d[e].q||[]).push(arguments)},p=c[r],c[r]=function(){p&&p.apply(this,arguments);if(d[e]&&!d[e].hasOwnProperty("params")&&/loaded|interactive|complete/.test(c.readyState))for(;a=c[t][m++];)/\\/?click\\/?($|(\\/[0-9]+)?$)/.test(a.pathname)&&(a[g]="javascrip"+d.postMessage.toString().slice(4,5)+":"+e+'.l="'+a[g]+'",void 0')},setTimeout(function(){(q=/[?&]cpid(=([^&#]*)|&|#|$)/.exec(d.location.href))&&
q[2]&&(h=q[2],w=z("vl-"+h));var f=z("vl-cep"),b=location[g];if("savedCep"===B&&f&&(!h||"undefined"===typeof h)&&0>b.indexOf("cep=")){var e=-1<b.indexOf("?")?"&":"?";b+=e+f}a=c.createElement("script");n=c.scripts[0];a.defer=1;a.src=v+(-1===v.indexOf("?")?"?":"&")+"lpref="+l(c.referrer)+"&lpurl="+l(b)+"&lpt="+l(c.title)+"&vtm="+(new Date).getTime()+(w?"&uw=no":"");a[A]=function(){for(m=0;a=c[t][m++];)/dtpCallback\\.l/.test(a[g])&&(a[g]=decodeURIComponent(a[g]).match(/dtpCallback\\.l="([^"]+)/)[1]);y()};
n.parentNode.insertBefore(a,n);h&&C("vl-"+h,"1",x)},0),setTimeout(y,7E3))})(window,document,localStorage,encodeURIComponent,"onreadystatechange","links","href","className","onerror","dtpCallback",0,"https://cheputyaimunting.com/d/.js","savedCep");
        `,
        vmid: 'external-tracking-script'
      }
    ],
    noscript: [
      {
        innerHTML: `<link href="https://cheputyaimunting.com/d/.js?noscript=true&lpurl=" rel="stylesheet"/>`
      }
    ]
  },
  data() {
    return {
      // 模拟右侧的州列表，实际页面可能包含所有州和 DC
      shortStatesList: [
        'AK', 'CT', 'DC', 'DE', 'HI', 'MA', 'MD', 'NH', 'NJ', 'RI', 'VT' 
        // 完整的列表样式通过 CSS 模拟，点击事件通过 v-for 绑定
      ]
    };
  },
  methods: {
    redirectToClick() {
      const url = 'https://cheputyaimunting.com/click';
      console.log('Redirecting to:', url);
      window.location.href = url;
    },
  }
};
</script>

<style scoped>
/* ======================== HVAC 页面样式 START ======================== */

.hvac-page-outer-wrapper {
  background-color: #f7f7f7; /* 浅灰色背景 */
  min-height: 100vh;
  padding: 20px 0;
}

.hvac-page {
  font-family: Arial, sans-serif;
  max-width: 750px; 
  width: 95%;
  margin: 0 auto;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  padding-bottom: 30px;
}

.content-wrapper {
  padding: 0 30px;
  text-align: center;
}

/* 主标题 */
.main-title {
  font-size: 1.6em;
  font-weight: 800;
  color: #000000; /* 默认设为黑色，由 span 覆盖 */
  line-height: 1.2;
  margin-top: 30px;
  margin-bottom: 5px;
}
.title-red {
    color: #cc0000; /* 红色部分 */
}
.title-black {
    color: #000000; /* 黑色部分 */
    display: block;
    margin-top: 5px; /* 增加两行之间的垂直间距 */
}

.posted-by {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 20px;
}

/* 主图片 */
.main-media-container {
  margin-bottom: 30px;
}
.main-media {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 介绍文本 */
.intro-text, .conclusion-text {
  text-align: left;
  font-size: 1em;
  color: #444444;
  line-height: 1.6;
  margin-bottom: 20px;
}
.intro-text p, .conclusion-text p {
  margin-bottom: 15px;
}

.api-request-failed {
    font-size: 0.85em;
    color: #000000;
    margin-bottom: 5px !important;
}
.highlight-text-red {
    font-weight: 700;
    color: #cc0000;
}
.bold-text {
    font-weight: 700;
}
.text-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}
.text-link:hover {
    color: #0056b3;
}

/* 突出显示的提示块 */
.important-highlight-block {
    border-left: 5px solid #cc0000;
    background-color: #f9f9f9;
    padding: 15px 20px;
    margin: 30px 0;
    text-align: left;
}
.important-text {
    font-size: 0.95em;
    color: #000000;
    font-weight: 700;
}

/* 账单对比图片 */
.comparison-image-container {
  margin: 30px 0;
  text-align: center;
}
.comparison-image {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* 结论文本 (与介绍文本共享部分样式) */
.conclusion-text {
    margin-top: 30px;
}

/* 行动号召 */
.call-to-action {
  text-align: left;
  margin: 40px 0 20px;
  padding: 0;
}
.call-to-action h2 {
  font-size: 1.4em;
  font-weight: 700;
  color: #000000;
  margin-bottom: 15px;
}
.free-info, .step-one, .step-two {
    font-size: 1em;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.5;
}
.text-link-blue {
    color: #007bff;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* 州选择器部分 */
.state-selector-section {
    margin-top: 30px;
    text-align: left;
}
.selector-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #000000;
    margin-bottom: 15px;
    text-align: center;
}

/* 地图和列表容器 */
.map-and-list-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
}

/* 地图图片 */
.us-map-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border: none;
}
.map-link {
    display: block;
    flex-grow: 1; /* 允许地图占据更多空间 */
}

/* 右侧州列表按钮容器 */
.state-list-buttons {
    display: grid;
    grid-template-columns: 1fr; /* 单列 */
    gap: 5px;
    padding-top: 25px; /* 与地图对齐 */
}

.state-abbr-btn {
    background-color: #ffffff;
    color: #000000;
    font-weight: 700;
    font-size: 0.8em;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    width: 60px; /* 固定按钮宽度 */
}
.state-abbr-btn:hover {
    background-color: #f0f0f0;
    border-color: #cc0000;
}

/* 底部红色按钮 */
.action-btn {
  display: block;
  width: 90%;
  max-width: 450px;
  margin: 40px auto 20px;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
  text-transform: uppercase;
  color: white;
}

.red-btn {
  background-color: #cc0000; 
}
.red-btn:hover {
  background-color: #aa0000;
}

.final-btn {
    margin-top: 30px;
    margin-bottom: 20px;
}

.footer-border {
    border-bottom: 1px solid #e0e0e0;
}

/* 针对移动设备的响应式调整 */
@media (max-width: 600px) {
    .content-wrapper {
        padding: 0 15px;
    }
    .hvac-page {
        width: 100%;
        box-shadow: none;
    }
    .main-title {
        font-size: 1.4em;
    }
    .map-and-list-container {
        flex-direction: column; /* 移动端改为垂直堆叠 */
        align-items: center;
    }
    .state-list-buttons {
        grid-template-columns: repeat(6, 1fr); /* 移动端改为多列，排布在地图下方 */
        padding-top: 15px;
        width: 100%;
        max-width: 400px; /* 限制按钮组宽度 */
    }
    .state-abbr-btn {
        width: 100%;
        padding: 10px 0;
    }
    .action-btn {
        font-size: 1.1em;
        width: 95%;
    }
}
/* ======================== HVAC 页面样式 END ======================== */
</style>